package com.wn32.main.demo13;

import com.wn32.main.myannos.ProductAnno;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MyHandler implements InvocationHandler {

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        ProductAnno pa = method.getDeclaredAnnotation(ProductAnno.class);
        String sql = pa.value();
        System.out.println("调用jdbc:run:" + sql);
        return null;
    }
}
